package s08.ch10.ex1;

import java.util.Calendar;
import java.util.Date;


public class Calendar1 {

	
	public static void main(String[] args) throws InterruptedException {
		Calendar calendar = Calendar.getInstance();
		System.out.println(calendar);
		Date date = calendar.getTime();
		System.out.println(date);
		Integer year = calendar.get(Calendar.YEAR);
		System.out.println(year);
		Thread.sleep(5000);
		calendar.setTime(new Date());
		System.out.println(calendar.getTime());
	}

}
